  $(document).ready(function() {
      $('#fileInput').uploadify({
	      'uploader'  : '/js/uploadify/uploadify.swf',
	      'script'    : '/articles/uploadphotos?id='+$('#id').val(),
	      'scriptData': '/articles/uploadphotos',	      
	      'checkScript' : '/articles/checkphotos',
	      'scriptAccess': 'always',
	      'folder'    : '/upload',
	      'cancelImg' : '/js/uploadify/cancel.png',
	      'buttonImg' : '/js/uploadify/upload.png',
	      'width'     : 166,
	      'height'    : 40,
	      'auto'      : false,
	      'multi'     : true,
	      'fileExt'   : '*.jpg',
	      'onComplete': function(event, queueID, fileObj, response, data){       	   			
       	   			if(response != 1) alert(response);
       			},
       	  'onError': function(){        	  	      		
       	   			alert('error');
       			}	
      });
      
       
  });